/**
 * @Author: hl
 * @Date: 2019/8/16
 * @Last Modified by: hl
 * @Last Modified time:
 */

import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 预收款客户查询
export const saveAdvancesReceived = params => axios.post(`${SERVER.DMSCLOUD_FINANCE}/preReceiveMoney/save`, params);
// 预收款客户信息
export const findOwnerAmount = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/preReceiveMoney/findOwnerAmount`, { params });
// 预收款明细
export const findOwnerAmountDetail = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/preReceiveMoney/findOwnerAmountDetail`, { params });
// 预收款明细
export const exportOwnerExcel = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/preReceiveMoney/exportOwner`, { params, responseType: 'arraybuffer' });

// 预收款客户查询
export const prepayCustomer = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/finance/advancesReceived/prepayCustomer`, { params });
// 预收款导出
export const exportExcelData = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/finance/advancesReceived/prepayCustomer/export/excel`, { params, responseType: 'arraybuffer' });

// 预收款明细查询
export const queryPrePay = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/finance/advancesReceived/queryPrePay`, { params });
// 查询所有员工
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
